package com.xbts.system.enums;

/**
 * @Author llk
 * @Date 2023/8/7 16:39
 */
public enum EipEnum {

    AF_SOUTH_1("af-south-1","5_bgp"),
    AP_SOUTHEAST_1("ap-southeast-1","5_bgp"),
    AP_SOUTHEAST_2("ap-southeast-2","5_bgp"),
    AP_SOUTHEAST_3("ap-southeast-3","5_bgp"),
    CN_EAST_2("cn-east-2","5_bgp"),
    CN_EAST_3("cn-east-3","5_bgp"),
    CN_NORTH_1("cn-north-1","5_bgp"),
    CN_NORTH_4("cn-north-4","5_bgp"),
    CN_NORTH_9("cn-north-9",""),
    CN_SOUTH_1("cn-south-1","5_bgp"),
    CN_SOUTH_4("cn-south-4",""),
    CN_SOUTHWEST_2("cn-southwest-2","5_sbgp"),
    LA_SOUTH_2("la-south-2","5_bgp"),
    NA_MEXICO_1("na-mexico-1","5_bgp"),
    SA_BRAZIL_1("sa-brazil-1","5_bgp"),
    ;
    private final String regionId;
    private final String eip;

    EipEnum(String regionId, String eip) {
        this.regionId = regionId;
        this.eip = eip;
    }

    public String getRegionId() {
        return regionId;
    }

    public String getEip() {
        return eip;
    }

    public static String getEip(String regionId){
        for (EipEnum value : EipEnum.values()) {
            if (value.getRegionId().equals(regionId)){
                return value.getEip();
            }
        }
        return null;
    }
}
